projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e1a8aa
)
textview: Tweak render nodes
author
Matthias Clasen
<mclasen@redhat.com>
Sun, 28 Mar 2021 14:59:55 +0000
(10:59 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Sun, 28 Mar 2021 14:59:55 +0000
(10:59 -0400)
Arrange for the contents to be in a single transform
node that is updated as we scroll. This makes the job
of the render node differ a lot easier, since it does
not have to compare to big containers one-by-one.
gtk/gtktextlayout.c
patch
|
blob
|
history
diff --git
a/gtk/gtktextlayout.c
b/gtk/gtktextlayout.c
index b90e6d12f1e921ff4bacd8018140921e3f489b81..05d9fa9b2a897c3a5259141083d0bc3c617b78a8 100644
(file)
--- a/
gtk/gtktextlayout.c
+++ b/
gtk/gtktextlayout.c
@@
-4160,6
+4160,9
@@
gtk_text_layout_snapshot (GtkTextLayout *layout,
if (line_list == NULL)
return; /* nothing on the screen */
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (0, offset_y));
+ offset_y = 0;
+
cursor_snapshot = gtk_snapshot_new ();
crenderer = gsk_pango_renderer_acquire ();